<div style="height:auto;width:100%">
<form>       

<table id='city_maintbl' width="100%">
<tr>
<td width="30%" height="500">
<div class='ui-widget-header1 ui-corner-all'>
<table width="100%">   
    <tr>
    <td width="300">
    Loại tài khoản
    </td>
    <td id="tdPowertype">
    <select id="cmbPowerType" style="width:200px" name="cmbPowerType">                
        <option value="">--Chọn--</option>
    </select>
    </td>
    </tr>
    <tr>
    <td>Quyền </td>
    <td id="tdPower">
    <select style="width:200px" id="cbbRoles">                         
        <option value="">--Chọn--</option>        
    </select>    
    </td>

    </tr>
    <tr>
    <td>
    Tên đăng nhập 
    </td>
    <td >
    <input type="text" maxlength="64" id="txtAddUsername" name="txtAddUsername" value="" style="width:200px" />
    
    </td>
    </tr>
    <tr>
    <td >
    Mật khẩu 
    </td>
    <td >
    <input type="password" maxlength="64" id="txtPassword" name="txtPassword" value="" style="width:200px"/>
    </td>
    </tr>
    <tr>
    <td >
    Nhập lại mật khẩu 
    </td>
    <td>
    <input type="password" maxlength="64" id="txtPassword2" name="txtPassword2" value="" style="width:200px"/>
    
    </td>
    </tr>
    <tr>
    <td>
    Email 
    </td>
    <td>
    <input type="text" maxlength="255" id="txtEmail" name="txtEmail" value="" style="width:200px" />
    
    
    <!--<a href="#tabs-1">Preloaded</a>-->
    </td>
    </tr>
  

    <tr>
    <td>
    Địa chỉ 
    </td>
    <td>
    <input type="text" maxlength="255" id="txtAddress" name="txtAddress" value="" style="width:200px" />
    </td>
    </tr>
    <tr>
    <td>
    Điện thoại
    </td>
    <td>
    <input type="text" id="txtPhone" maxlength="32" name="txtPhone" value="" style="width:200px" />
     
    </td>
    </tr>
    <tr>
    <td>
    Kích hoạt 
    </td>
    <td>
    <input type="checkbox" id="chkActive" name="chkActive" checked="checked"/>
    </td>
    </tr>    
    <tr id="AddType">
    <td align="center" colspan="2" >
    

    <button  onClick="SaveUser();" > <font color="#FF0000"><u>L</u></font>ưu </button>
    <button  onClick="resetForm();"  accesskey="N"> <font color="#FF0000"><u>N</u></font>hập Lại</button>
    
    
    </td>
    
    </tr>
    
</table></div> </td>
<td width="70%" height="500" class='ui-corner-all' style="background-color:blue;"><div style="background-color:blue;height:auto"><div id="city_divGrid" style="background-color:blue;height:auto" > fdfsdfs       
</div></div></td></tr>
</table>

    
        <input type="hidden" name="hidMethod" id="hidMethod" value="add">
    <input type="hidden" name="hidID" id="hidID" value="">  
    </form>       
            
    </div>

<script language="javascript" src="script/js.const.js" >
</script>

<!--<script>
    $(function() {
        $( "inputsubmit, button" ).button();
        $( "a", ".demo" ).click(function() { return false; });
    });
    </script>-->
    
<script language="javascript">

 function initTable(){
     
     $("#tableOne").tablesorter({ debug false, sortList [[0, 0]], widgets ['zebra', 'columnHighlight'] })
                .tablesorterPager({ container $("#pagerOne"), position:fixed false });
     
 }
 
function fn_changePowerType(type_id){
    xajax_loadPower(type_id);
}
function changMode(value){
    if(value==1){
      $('#AddType').css('display','none'); 
      $('#SearchType').css('display',''); 
    }else{
      $('#AddType').css('display',''); 
      $('#SearchType').css('display','none');   
    }
}
function SaveUser(){
    var arrParams = new Array();
    arrParams['txtAddUsername']=$.trim($('#txtAddUsername').val());
    arrParams['txtPassword']=$.trim($('#txtPassword').val());
    arrParams['cmbPowerType']=$.trim($('#cmbPowerType').val());
    arrParams['cbbRoles']=$.trim($('#cbbRoles').val());
    arrParams['txtEmail']=$.trim($('#txtEmail').val());
    arrParams['cmbCity']=$.trim($('#cmbCity').val());
    arrParams['txtAddress']=$.trim($('#txtAddress').val());
    arrParams['txtPhone']=$.trim($('#txtPhone').val());
    arrParams['chkActive']=$('#chkActive').attr('checked')?10;
    xajax_SaveUser(arrParams);
}
function ActiveItem(id){
    xajax_ActiveItem(id);
}
function changeStatus(id){
   if($('#imgactive'+id).attr('title')=='Bỏ kích hoạt'){
      $('#imgactive'+id).attr('src','images/icons/icon-deactivated.gif') ;
      $('#imgactive'+id).attr('title','Kích hoạt') ;
   }else{
      $('#imgactive'+id).attr('src','images/icons/icon-active.gif') ;
      $('#imgactive'+id).attr('title','Bỏ kích hoạt') ; 
   }
}
//
  xajax_frmusersInit();  
</script>